/*************************************************************************
> File Name: main.cpp
> Author: hzy
> Created Time: 2023-08-09 19:03:28
> Description:
************************************************************************/
#include "cube.h"

int main()
{
    Cube c1;
    Cube c2;

    c1.setL(10);
    c1.setW(10);
    c1.setH(10);

    c2.setL(20);
    c2.setW(20);
    c2.setH(20);

    cout << "c1的体积为：" << c1.calculateVolume() << ", c1的面积为：" << c1.calculateArea() << endl;
    cout << "c2的体积为：" << c2.calculateVolume() << ", c2的面积为：" << c2.calculateArea() << endl;

    // 成员方法
    bool flag = c1.compareCube(c2);
    if (flag == 1)
    {
        cout << "相等" << endl;
    }
    cout << "不相等" << endl;

    // 全局方法
    flag = compareCube(c1, c2);
    if (flag == 1)
    {
        cout << "相等" << endl;
    }
    cout << "不相等" << endl;

    return 0;
}